﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="分组验证.aspx.cs" Inherits="作业.分组验证" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>分组验证</title>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <script src="js/bootstrap.min.js"></script>
    <style>
        #body {
               text-align:center;
               padding-top:100px
        }
        #background {
               border-style: solid;
               border-width: 1px;
               text-align:center;
               border-color:inherit;
               width:800px;
               margin:auto;
               border-radius:20px;
               box-shadow:0px 0px 20px lightgray
        }

    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="form-inline">
                <h2>分组验证</h2>
                <hr />

                <hr />
                <table style="width:100%;">
                    <tr>
                        <td>登录</td>
                        <td>注册</td>
                    </tr>
                    <tr>
                        <td class="style1">

                            用户名：
                            <asp:TextBox ID="txtUsername" class="form-control" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ForeColor="Red" ControlToValidate="txtUsername" ErrorMessage="请输入用户名！" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            注册账号：
                            <asp:TextBox ID="txtRUsername"  class="form-control" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ForeColor="Red" ControlToValidate="txtRUsername" ErrorMessage="请输入账号！" ValidationGroup="r"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            密&nbsp;&nbsp;&nbsp; 码：
                            <asp:TextBox ID="txtUserpass" class="form-control"  runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ForeColor="Red" ControlToValidate="txtUserpass" ErrorMessage="请输入密码！" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 码：
                            <asp:TextBox ID="txtRUserpass" class="form-control"  runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ForeColor="Red" ControlToValidate="txtRUserpass" ErrorMessage="请输入密码！" ValidationGroup="r"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            <asp:Button ID="Button1" class="btn btn-success" runat="server" Text="登录" ValidationGroup="a" OnClick="Button1_Click" />
                        </td>
                        <td>
                            <asp:Button ID="Button2" class="btn btn-success" runat="server" Text="注册" ValidationGroup="r" OnClick="Button2_Click" />
                        </td>
                    </tr>
                </table>
            </div>
    </form>
</body>
</html>
